{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 线性模型不要用pca，会失去特征与权重的关系，造成不可解释性\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd\n",
    "from sklearn.datasets import load_iris\n",
    "from sklearn.decomposition import PCA"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150, 4)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris = load_iris()\n",
    "x = iris.data\n",
    "y = iris.target\n",
    "x.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['setosa', 'versicolor', 'virginica'], dtype='<U10')"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "target_names = iris.target_names\n",
    "target_names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "pca = PCA(n_components=2)  # 默认不写n_components参数，有几个特征生成的数据还是几个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_dr = pca.fit_transform(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2.68420713,  0.32660731],\n",
       "       [-2.71539062, -0.16955685],\n",
       "       [-2.88981954, -0.13734561],\n",
       "       [-2.7464372 , -0.31112432],\n",
       "       [-2.72859298,  0.33392456],\n",
       "       [-2.27989736,  0.74778271],\n",
       "       [-2.82089068, -0.08210451],\n",
       "       [-2.62648199,  0.17040535],\n",
       "       [-2.88795857, -0.57079803],\n",
       "       [-2.67384469, -0.1066917 ],\n",
       "       [-2.50652679,  0.65193501],\n",
       "       [-2.61314272,  0.02152063],\n",
       "       [-2.78743398, -0.22774019],\n",
       "       [-3.22520045, -0.50327991],\n",
       "       [-2.64354322,  1.1861949 ],\n",
       "       [-2.38386932,  1.34475434],\n",
       "       [-2.6225262 ,  0.81808967],\n",
       "       [-2.64832273,  0.31913667],\n",
       "       [-2.19907796,  0.87924409],\n",
       "       [-2.58734619,  0.52047364],\n",
       "       [-2.3105317 ,  0.39786782],\n",
       "       [-2.54323491,  0.44003175],\n",
       "       [-3.21585769,  0.14161557],\n",
       "       [-2.30312854,  0.10552268],\n",
       "       [-2.35617109, -0.03120959],\n",
       "       [-2.50791723, -0.13905634],\n",
       "       [-2.469056  ,  0.13788731],\n",
       "       [-2.56239095,  0.37468456],\n",
       "       [-2.63982127,  0.31929007],\n",
       "       [-2.63284791, -0.19007583],\n",
       "       [-2.58846205, -0.19739308],\n",
       "       [-2.41007734,  0.41808001],\n",
       "       [-2.64763667,  0.81998263],\n",
       "       [-2.59715948,  1.10002193],\n",
       "       [-2.67384469, -0.1066917 ],\n",
       "       [-2.86699985,  0.0771931 ],\n",
       "       [-2.62522846,  0.60680001],\n",
       "       [-2.67384469, -0.1066917 ],\n",
       "       [-2.98184266, -0.48025005],\n",
       "       [-2.59032303,  0.23605934],\n",
       "       [-2.77013891,  0.27105942],\n",
       "       [-2.85221108, -0.93286537],\n",
       "       [-2.99829644, -0.33430757],\n",
       "       [-2.4055141 ,  0.19591726],\n",
       "       [-2.20883295,  0.44269603],\n",
       "       [-2.71566519, -0.24268148],\n",
       "       [-2.53757337,  0.51036755],\n",
       "       [-2.8403213 , -0.22057634],\n",
       "       [-2.54268576,  0.58628103],\n",
       "       [-2.70391231,  0.11501085],\n",
       "       [ 1.28479459,  0.68543919],\n",
       "       [ 0.93241075,  0.31919809],\n",
       "       [ 1.46406132,  0.50418983],\n",
       "       [ 0.18096721, -0.82560394],\n",
       "       [ 1.08713449,  0.07539039],\n",
       "       [ 0.64043675, -0.41732348],\n",
       "       [ 1.09522371,  0.28389121],\n",
       "       [-0.75146714, -1.00110751],\n",
       "       [ 1.04329778,  0.22895691],\n",
       "       [-0.01019007, -0.72057487],\n",
       "       [-0.5110862 , -1.26249195],\n",
       "       [ 0.51109806, -0.10228411],\n",
       "       [ 0.26233576, -0.5478933 ],\n",
       "       [ 0.98404455, -0.12436042],\n",
       "       [-0.174864  , -0.25181557],\n",
       "       [ 0.92757294,  0.46823621],\n",
       "       [ 0.65959279, -0.35197629],\n",
       "       [ 0.23454059, -0.33192183],\n",
       "       [ 0.94236171, -0.54182226],\n",
       "       [ 0.0432464 , -0.58148945],\n",
       "       [ 1.11624072, -0.08421401],\n",
       "       [ 0.35678657, -0.06682383],\n",
       "       [ 1.29646885, -0.32756152],\n",
       "       [ 0.92050265, -0.18239036],\n",
       "       [ 0.71400821,  0.15037915],\n",
       "       [ 0.89964086,  0.32961098],\n",
       "       [ 1.33104142,  0.24466952],\n",
       "       [ 1.55739627,  0.26739258],\n",
       "       [ 0.81245555, -0.16233157],\n",
       "       [-0.30733476, -0.36508661],\n",
       "       [-0.07034289, -0.70253793],\n",
       "       [-0.19188449, -0.67749054],\n",
       "       [ 0.13499495, -0.31170964],\n",
       "       [ 1.37873698, -0.42120514],\n",
       "       [ 0.58727485, -0.48328427],\n",
       "       [ 0.8072055 ,  0.19505396],\n",
       "       [ 1.22042897,  0.40803534],\n",
       "       [ 0.81286779, -0.370679  ],\n",
       "       [ 0.24519516, -0.26672804],\n",
       "       [ 0.16451343, -0.67966147],\n",
       "       [ 0.46303099, -0.66952655],\n",
       "       [ 0.89016045, -0.03381244],\n",
       "       [ 0.22887905, -0.40225762],\n",
       "       [-0.70708128, -1.00842476],\n",
       "       [ 0.35553304, -0.50321849],\n",
       "       [ 0.33112695, -0.21118014],\n",
       "       [ 0.37523823, -0.29162202],\n",
       "       [ 0.64169028,  0.01907118],\n",
       "       [-0.90846333, -0.75156873],\n",
       "       [ 0.29780791, -0.34701652],\n",
       "       [ 2.53172698, -0.01184224],\n",
       "       [ 1.41407223, -0.57492506],\n",
       "       [ 2.61648461,  0.34193529],\n",
       "       [ 1.97081495, -0.18112569],\n",
       "       [ 2.34975798, -0.04188255],\n",
       "       [ 3.39687992,  0.54716805],\n",
       "       [ 0.51938325, -1.19135169],\n",
       "       [ 2.9320051 ,  0.35237701],\n",
       "       [ 2.31967279, -0.24554817],\n",
       "       [ 2.91813423,  0.78038063],\n",
       "       [ 1.66193495,  0.2420384 ],\n",
       "       [ 1.80234045, -0.21615461],\n",
       "       [ 2.16537886,  0.21528028],\n",
       "       [ 1.34459422, -0.77641543],\n",
       "       [ 1.5852673 , -0.53930705],\n",
       "       [ 1.90474358,  0.11881899],\n",
       "       [ 1.94924878,  0.04073026],\n",
       "       [ 3.48876538,  1.17154454],\n",
       "       [ 3.79468686,  0.25326557],\n",
       "       [ 1.29832982, -0.76101394],\n",
       "       [ 2.42816726,  0.37678197],\n",
       "       [ 1.19809737, -0.60557896],\n",
       "       [ 3.49926548,  0.45677347],\n",
       "       [ 1.38766825, -0.20403099],\n",
       "       [ 2.27585365,  0.33338653],\n",
       "       [ 2.61419383,  0.55836695],\n",
       "       [ 1.25762518, -0.179137  ],\n",
       "       [ 1.29066965, -0.11642525],\n",
       "       [ 2.12285398, -0.21085488],\n",
       "       [ 2.3875644 ,  0.46251925],\n",
       "       [ 2.84096093,  0.37274259],\n",
       "       [ 3.2323429 ,  1.37052404],\n",
       "       [ 2.15873837, -0.21832553],\n",
       "       [ 1.4431026 , -0.14380129],\n",
       "       [ 1.77964011, -0.50146479],\n",
       "       [ 3.07652162,  0.68576444],\n",
       "       [ 2.14498686,  0.13890661],\n",
       "       [ 1.90486293,  0.04804751],\n",
       "       [ 1.16885347, -0.1645025 ],\n",
       "       [ 2.10765373,  0.37148225],\n",
       "       [ 2.31430339,  0.18260885],\n",
       "       [ 1.92245088,  0.40927118],\n",
       "       [ 1.41407223, -0.57492506],\n",
       "       [ 2.56332271,  0.2759745 ],\n",
       "       [ 2.41939122,  0.30350394],\n",
       "       [ 1.94401705,  0.18741522],\n",
       "       [ 1.52566363, -0.37502085],\n",
       "       [ 1.76404594,  0.07851919],\n",
       "       [ 1.90162908,  0.11587675],\n",
       "       [ 1.38966613, -0.28288671]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_dr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(50, 2)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_dr[y==0].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True,  True,  True,  True,  True,  True,  True,\n",
       "        True,  True,  True,  True,  True,  True,  True,  True,  True,\n",
       "        True,  True,  True,  True,  True,  True,  True,  True,  True,\n",
       "        True,  True,  True,  True,  True,  True,  True,  True,  True,\n",
       "        True,  True,  True,  True,  True,  True,  True,  True,  True,\n",
       "        True,  True,  True,  True,  True, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False, False, False, False,\n",
       "       False, False, False, False, False, False])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y == 0  # 这是一维的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-2.68420713, -2.71539062, -2.88981954, -2.7464372 , -2.72859298,\n",
       "       -2.27989736, -2.82089068, -2.62648199, -2.88795857, -2.67384469,\n",
       "       -2.50652679, -2.61314272, -2.78743398, -3.22520045, -2.64354322,\n",
       "       -2.38386932, -2.6225262 , -2.64832273, -2.19907796, -2.58734619,\n",
       "       -2.3105317 , -2.54323491, -3.21585769, -2.30312854, -2.35617109,\n",
       "       -2.50791723, -2.469056  , -2.56239095, -2.63982127, -2.63284791,\n",
       "       -2.58846205, -2.41007734, -2.64763667, -2.59715948, -2.67384469,\n",
       "       -2.86699985, -2.62522846, -2.67384469, -2.98184266, -2.59032303,\n",
       "       -2.77013891, -2.85221108, -2.99829644, -2.4055141 , -2.20883295,\n",
       "       -2.71566519, -2.53757337, -2.8403213 , -2.54268576, -2.70391231])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_dr[y==0][:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-2.68420713, -2.71539062, -2.88981954, -2.7464372 , -2.72859298,\n",
       "       -2.27989736, -2.82089068, -2.62648199, -2.88795857, -2.67384469,\n",
       "       -2.50652679, -2.61314272, -2.78743398, -3.22520045, -2.64354322,\n",
       "       -2.38386932, -2.6225262 , -2.64832273, -2.19907796, -2.58734619,\n",
       "       -2.3105317 , -2.54323491, -3.21585769, -2.30312854, -2.35617109,\n",
       "       -2.50791723, -2.469056  , -2.56239095, -2.63982127, -2.63284791,\n",
       "       -2.58846205, -2.41007734, -2.64763667, -2.59715948, -2.67384469,\n",
       "       -2.86699985, -2.62522846, -2.67384469, -2.98184266, -2.59032303,\n",
       "       -2.77013891, -2.85221108, -2.99829644, -2.4055141 , -2.20883295,\n",
       "       -2.71566519, -2.53757337, -2.8403213 , -2.54268576, -2.70391231])"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_dr[y==0,0]  # 和上边的性质一致，布尔索引进行行的选取，0选取第一列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEICAYAAAC3Y/QeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X2cHGWV6PHfmcmEZIhgmEQJGaYnKAjmDUKIAfcCGkCMEXQh12CDIZodEwTXFVzEWRdWd9TP1V3BK4iBxcRMQ0BQYFd2hVxh2V0jecGEtxAMyUzegEwmEhMGCMmc+0d1Jz09Vf1a1VXdfb6fT396urq66pkhnKp+nvOcR1QVY4wxtaUu7AYYY4wpPwv+xhhTgyz4G2NMDbLgb4wxNciCvzHG1CAL/sYYU4Ms+JuqJyKfFpGtIrJPRE5zeX+fiJyQ5fO3i8g3fWjHEyIyv9TjGOMHC/6mFvwAuFpVR6jqHzLfTG7f5PVhVV2gqt8OtIUZRKRLRM6rlvOY6LHgb2pBDHi+mA+KSL3PbTEmEiz4m0Al7yxvEJEXRORPIvIzERmW9v7FIrJWRP4sIi+LyIXJ7fNEZL2I7BWRTSLyxSznqBORvxORbhHZKSI/F5GjReQIEdkH1APrRORlj8+riLw/+fNiEfmJiDwiIm8AH0lu+8fk+6NE5N9E5HUR2S0i/yUirv8ficj5IvKiiOwRkR8Dkvbe+0TktyLSKyK7RCQhIu9OvrcUaAH+Ndkl9bfJ7b8QkVeTx3tSRManHW9m8m+8V0S2i8h1ae/NSv6NXxeR34nIpGznMTVCVe1hj8AeQBfwHHA8cAzwP8A/Jt+bBuwBzse5ERkLnJx87xPA+3AC5jlAHzDF4xyfBzYCJwAjgF8CS9PeV+D9Wdp46H1gcbJNH062aVhyW6rN3wVuBxqSj/8FiMsxRwF/Bi5N7vc3wAFgfvL99yd/7yOA0cC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4MOxG5OEAcK2qngJMB74U4b/r28BHVXUycCpwoYhMD7lNufw1sN6PA1nwB1T1z2kvjwQiOQquqo+q6oHky98DxddzDZiqrlfVDWG3I4tpwEZV3aSq+4FlwMUht8mTqj4J7A67Hbmo6iuq+nTy5704gWpsuK1yl1zydl/yZUPyEcn/9wFEpBn4BHCnH8ez4J8kIh0ishWIE907/3SfB/497EZUsLHA1rTX24hokKpUItIKnAY8FW5LvCW7UdYCO4HHVDWybQVuBv4W6PfjYDUT/EVkuYg85/K4GEBV21X1eCABXB3Vdib3acf5ep0Iq53JduRsa4SJy7bI3vVVGhEZATwAfCXjm3WkqOrBZHdvMzBNRCaE3SY3IjIL2Kmqa/w6Zs0s5qKq5+W5693Ar4EbA2yOp1ztFJG5wCxghoY8SaOAv2kUbQOOT3vdDOwIqS1VRUQacAJ/QlV/GXZ78qGqr4vIEzjjKlEcVP8wcJGIzASGAUeJSKeqXl7sAWvmzj8bETkx7eVFwIthtSUbEbkQuB64SFX7wm5PhVsFnCgi40RkKDAHeDjkNlU8ERHgX4D1qvrPYbcnGxEZncqYE5HhwHlE9P99Vb1BVZtVtRXn3+pvSwn8YME/5XvJ7opngAtwRtSj6MfAu4DHkmmpt4fdIC8i8mkR2QacCfxaRH4TdpvSJQfOrwZ+gzMoeZ+qPh9uq7yJyD3ACuADIrJNRL4Qdps8fBi4Avho8t/o2uTdahSNAR5P/n+/CqfPv+QUykph5R2MMaYG2Z2/McbUIAv+xhhTgyz4G2NMDbLgb4wxNciCvzHG1CAL/sYYU4Ms+BtjTA36/4wms2J6Kqe+AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "colors = ['red','black','orange']\n",
    "for i in [0,1,2]:\n",
    "    plt.scatter(x_dr[y==i,0],x_dr[y==i,1],c=colors[i], label=target_names[i])\n",
    "plt.legend()\n",
    "plt.title('pca of iris dataset')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4.22484077, 0.24224357])"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 得到的数组中的包含每个特征对应的可解释性方差的大小，也就是信息量的大小\n",
    "pca.explained_variance_  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.92461621, 0.05301557])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看降维后每个新特征向量所占的信息量占原始数据总信息量的百分比（可解释方差贡献率）\n",
    "pca.explained_variance_ratio_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9776317750248034"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 求出降维后所有特征所占信息量的加和，得到降维后的信息量占原有信息量的百分比\n",
    "pca.explained_variance_ratio_.sum()  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.92461621, 0.05301557, 0.01718514, 0.00518309])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 可以根据可解释方差贡献率绘制累加曲线，观察选择不同的\n",
    "import numpy as np\n",
    "pca_line = PCA().fit(x) \n",
    "# PCA不设置n_components参数时，下方会输出每个特征的信息量占比，总和为1\n",
    "# 以此绘图，可看出在哪个位置曲线发生了突变，选择突变位置作为参数的值即可，在此位置能够保留大部分特征，并达到降维的目的\n",
    "pca_line.explained_variance_ratio_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0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Aw/P24YxGprXRmISIiKenMQkREUtKZhYiIpKRkISIiKSlZiIhISkoWIiKSkpKFiIikpGQhIiIp/X/rwSdyz+YTuwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot([1,2,3,4],np.cumsum(pca_line.explained_variance_ratio_))\n",
    "plt.xticks([1,2,3,4]) #这是为了限制坐标轴显示为整数\n",
    "plt.xlabel(\"number of components after dimension reduction\")\n",
    "plt.ylabel(\"cumulative explained variance\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.92461621, 0.05301557])"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 按信息量占比选超参数\n",
    "# 如果有很多特征，直接指定占比，感觉可能会达不到降维的目的\n",
    "# 猜想可以写for循环，自定不同的占比，观察降维后的特征数量减少量的变化，选择合适的占比\n",
    "pca_f = PCA(n_components=0.97,svd_solver=\"full\")\n",
    "pca_f = pca_f.fit(x)\n",
    "X_f = pca_f.transform(x)\n",
    "pca_f.explained_variance_ratio_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
